<!DOCTYPE html>
<html>
<head>
	<title>店铺信息</title>
	<include file='public/head'></include>
	<style>
		.layui-legend-size{font-size:14px !important;}
		.layui-nopadding{padding:0 !important;}
		.layui-overflow{overflow:auto;}
		.layui-nomargin{margin: 0 !important;}
		.layui-bottom{border-bottom:1px solid rgb(226, 226, 226);}
		.layui-input{height:30px !important; }
		.layui-form-search-item .layui-inline{margin-bottom: 5px;}
		.layui-form-search-item label{margin-left: 15px;}
		.layui-table-page {padding: 7px 0px 0px;}
		.layui-field-padding{border-width: 1px;padding:0 0 5px 10px;}
	</style>
</head>
<body>
<!-- layui-tab开始 -->
<div class="layui-tab " lay-filter="demo-tab">
	<if condition="$noNav eq '0'">
			<!-- 顶部导航菜单开始 -->
			<div class="layui-tab-nav" >
		        <ul class="layui-tab-title">
					{:getNav('store','admin_index/storeinfo')};
				</ul>
			</div>
			<!-- 顶部导航菜单结束 -->
	</if>
	<!-- 表格内容开始 -->
	<div class="layui-card">
		<div class="layui-card-body layui-nopadding " >
			<fieldset class="layui-elem-field layui-field-title layui-field-padding">
				<legend class="layui-legend-size">店铺信息</legend>
				<table  class="layui-table layui-nomargin" >
					<tr>
						<td rowspan="5" width="20%">
							<center>
								<div onclick="show_img(this)">
									<img src="{$store->store_log}">
								</div>
								<br>
								<b>{$store->store_name}</b>
								<br>
								<button class="layui-btn layui-btn-danger" onclick="editStore('{$store->store_id}')">编辑资料</button>
							</center>
						</td>
						<td width="10%">用户ID</td>
						<td>{$store->uid}</td>
						<td width="10%">手机号</td>
						<td>{$store->store_principal_phone}</td>
					</tr>
					<tr>
						<td>店铺老板</td>
						<td>{$store->store_principal}</td>
						<td>入驻时间</td>
						<td>
							<php>
								echo date('Y-m-d',$store->create_time);
							</php>
						</td>
					</tr>
					<tr>
						<td>主营业务</td>
						<td>{$store->store_type}</td>
						<td>上次登录</td>
						<td>
							<php>
								echo date('Y-m-d H:i:s',$last_login_time);
							</php>
						</td>
					</tr>
					<tr>
						<td>身份证</td>
						<td>{$store_info->store_idcard}</td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>营业地</td>
						<td colspan="3">{$store->address}</td>
					</tr>
				</table>
			</fieldset>
		</div>
	</div>
	<div class="layui-card">
		<div class="layui-card-body layui-nopadding " >
				<fieldset class="layui-elem-field layui-field-title layui-field-padding">
					<legend class="layui-legend-size">证件信息</legend>
					<table  class="layui-table layui-nomargin" >
						<tr>
							<td width="25%">身份证正面</td>
							<td width="25%">身份证反面</td>
							<td width="25%">手持身份证</td>
							<td width="25%">营业执照</td>
						</tr>
						<tr>
							<td>
								<center onclick="show_img(this)">
									<img src="{$path.$store_info->store_idcard_img_front}">
								</center>
							</td>
							<td>
								<center onclick="show_img(this)">
									<img src="{$path.$store_info->store_idcard_img_reverse}">
								</center>
							</td>
							<td>
								<center onclick="show_img(this)">
									<img src="{$path.$store_info->store_hand_idcard_img}">
								</center>
							</td>
							<td>
								<center onclick="show_img(this)">
									<img src="{$path.$store_info->store_business_img}">
								</center>
							</td>
						</tr>
					</table>
				</fieldset>
		</div>
	</div>
	<!-- <div class="layui-card">
		<div class="layui-card-body layui-nopadding " >
				<fieldset class="layui-elem-field layui-field-title layui-field-padding">
					<legend class="layui-legend-size">发货地址</legend>
					<table  class="layui-table layui-nomargin" >
						<tr>
							<td>姓名</td>
							<td>手机号码</td>
							<td>详细信息</td>
							<td>邮政编码</td>
							<td>默认地址</td>
						</tr>
						<tr>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
						</tr>
					</table>
				</fieldset>
		</div>
	</div>
	<div class="layui-card">
		<div class="layui-card-body layui-nopadding " >
				<fieldset class="layui-elem-field layui-field-title layui-field-padding">
					<legend class="layui-legend-size">日志记录</legend>
					<table  class="layui-table layui-nomargin" >
						<tr>
							<td>编号</td>
							<td>操作人</td>
							<td>操作时间</td>
							<td>操作栏目</td>
							<td>操作内容</td>
						</tr>
						<tr>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
						</tr>
					</table>
				</fieldset>
		</div>
	</div>	 -->
</div>
<include file='public/scripts'></include>
<script type="text/javascript">
function editStore(id){
	//编辑店铺
	let url = "{:cmf_plugin_url('Store://admin_index/editStore')}?id="+id;
	layer.open({
		type: 2//基本层类型  0（信息框，默认）1（页面层）2（iframe层）3（加载层）4（tips层）
		,title: '编辑属性'//层的标题
		,shadeClose: true//是否点击遮罩关闭
		,shade: 0.8//遮罩
		,area: ['100%', '100%']//宽高
		,btn:['提交','关闭']//弹框按钮
		,fixed:false//固定
		,content: url //iframe的url
		,yes:function(index, layero){
        //子页面的请求操作都放子页面
            var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：
            iframeWin.tijiao();
		}
		,btn2:function(index, layero){
		}
	});
}
	//显示大图片
	function show_img(t) {
	    var t = $(t).find("img");
	    //页面层
	    layer.open({
	    	title:false,
	        type: 1,
	        skin: 'layui-layer-rim', //加上边框
	        area: ['auto','auto'],
	         // area: ['80%', '80%'], //宽高
	         scrollbar: false,
	        shadeClose: true, //开启遮罩关闭
	        end: function (index, layero) {
	            return false;
	        },
	        content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>'
	    });
	}
</script>
</body>
</html>